<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title></title>
		<link rel="stylesheet" href="../layui/css/layui.css">
		<link rel="stylesheet" type="text/css" href="../css/base.css">
		<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
		<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
		<!--[if lt IE 9]>
      <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
	</head>


		<script language="javascript">
			function doNew() {
				var url = "../base/EstablishmentTypeNew.html";
				ShowIframeNoScroll("单位类别", url, 320, 260, "refreshWin()");
			}

			function refreshWin() {
				window.location.reload(true);
			}

			function doEdit(id) {
				var url = "../base/EstablishmentTypeEdit.html?id=" + id;
				ShowIframeNoScroll("单位类别", url, 320, 260, "refreshWin()");
			}

			function doDelete(id) {
				ShowConfirm('确认框', '确定删除吗？', 340, 80, "doDelAct(" + id + ")");
			}

			function doDelAct(id) {
				if(popRetVal != null) {
					window.location = "../base/EstablishmentTypeDelete.html?id=" + id;
				}
			}

			function doCancel() {
				window.close();
			}
		</script>
	</head>

	<body oncontextmenu="return false" class="sheet" style="text-align:center;">
		<div class="sheet-main" style="width:360px;text-align:left;margin:auto;">
			<div class="sheet-top">
				<div class="content">
					<h2>单位类别</h2>
					<p>根据客户性质设置，方便分类查询</p>
				</div>
			</div>
			<div class="sheet-list">
				<div class="search-business">
					<div class="add_content">
						<div align="right"><input class="buttom search-add" value=" 新 增" onclick="doNew();" type="button"></div>
					</div>

					<table width="98%" cellspacing="0" cellpadding="0" border="0">
						<tbody>
							<tr id="errorMsgTr" style="display:none">
								<td>
									<div class="msg-error" id="errorMsgTd">

									</div>
								</td>
							</tr>
						</tbody>
					</table>
					<div class="table-list">
						<table width="100%">
							<tbody>
								<tr>
									<th width="100">序号</th>
									<th width="150">名称</th>
									<th>操作</th>
								</tr>

								<tr>
									<td>1</td>
									<td>广告公司</td>
									<td>
										<a href="javascript:doEdit('1');">编辑</a>
										<a href="javascript:doDelete('1');">删除</a>
									</td>
								</tr>

								<tr>
									<td>2</td>
									<td>直接客户</td>
									<td>
										<a href="javascript:doEdit('2');">编辑</a>
										<a href="javascript:doDelete('2');">删除</a>
									</td>
								</tr>

								<tr>
									<td>3</td>
									<td>标识汇</td>
									<td>
										<a href="javascript:doEdit('3');">编辑</a>
										<a href="javascript:doDelete('3');">删除</a>
									</td>
								</tr>

								<tr>
									<td>4</td>
									<td>零售客户</td>
									<td>
										<a href="javascript:doEdit('4');">编辑</a>
										<a href="javascript:doDelete('4');">删除</a>
									</td>
								</tr>

								<tr>
									<td>5</td>
									<td>装饰公司</td>
									<td>
										<a href="javascript:doEdit('5');">编辑</a>
										<a href="javascript:doDelete('5');">删除</a>
									</td>
								</tr>

								<tr>
									<td>6</td>
									<td>市场同行</td>
									<td>
										<a href="javascript:doEdit('6');">编辑</a>
										<a href="javascript:doDelete('6');">删除</a>
									</td>
								</tr>

								<tr>
									<td>7</td>
									<td>签约客户</td>
									<td>
										<a href="javascript:doEdit('7');">编辑</a>
										<a href="javascript:doDelete('7');">删除</a>
									</td>
								</tr>

								<tr>
									<td>8</td>
									<td>私企</td>
									<td>
										<a href="javascript:doEdit('8');">编辑</a>
										<a href="javascript:doDelete('8');">删除</a>
									</td>
								</tr>

							</tbody>
						</table>
					</div>
				</div>
			</div>
			<div class="blank12">
			</div>

		</div>
		<script src="../layui/layui.all.js"></script>
		<script>
			function enlargeMyself(w,h,curWinW,curWinH){//放大父窗口
	// 获取窗口宽度
				if (window.top.document.body.scrollWidth)
					ww = window.top.document.body.scrollWidth;
				else if ((document.body) && (document.body.clientWidth))
					ww = document.body.clientWidth;
				// 获取窗口高度
				if (window.top.innerHeight)
					wh = window.top.innerHeight;
				else if ((document.body) && (document.body.clientHeight))
					wh = document.body.clientHeight;
				alert(ww);
				var w = (ww - 200) + 'px';
				var h = (wh - 100) + 'px';
				
				var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
				parent.layer.style(index, {
				  width: w,
				  height: h,
				  top: '50px',
				  left: '100px',
				});
//	if(!window.opener){
//		var pIframeId=parent.getPopContent("iframeIdName");
//		if(pIframeId!=null && pIframeId!=''){
//			if(parent.G(pIframeId)){
//				parent.G('dialogBoxTitleTr').style.display="none";
//		   		parent.G('dialogBox').style.width=w+30+"px";
//		   		parent.G(pIframeId).style.width=w+30+"px";
//		   		
//		   		var boxH=parent.G('dialogBox').style.height;
//				boxH=boxH.substr(0,boxH.length-2);
//				if(boxH<h){
//					parent.G('dialogBox').style.height=h+20+"px";
//					parent.G(pIframeId).style.height=h+20+"px";
//				}
//		   		parent.doMiddle();
//			}
//		}
//	}else{//当前窗口不是pop来的,如果尺寸不够,要扩大
//		//curWinHeight=document.body.offsetHeight;
//		//curWinWidth=document.body.offsetWidth;
//		if(curWinW!=null){//有传原窗口大小参数时才扩大
//	   		if(document.body.clientWidth<w){
//	   			var resizeW=w+50;
//	   			var resizeH=h+50;
//	   			window.moveTo(0,0);//有些浏览器在右边超出屏幕时不会resizeTo,先移到左上
//	   			window.resizeTo(resizeW,resizeH);
//	   			//居中
//	   			var resizeWinTop=0;
//	   			var resizeWinLeft=0;
//	   			if(window.screen.availHeight>resizeH){
//	   				resizeWinTop=(window.screen.availHeight-resizeH)/2;
//	   			}
//	   			if(window.screen.availWidth>resizeW){
//	   				resizeWinLeft=(window.screen.availWidth-resizeW)/2;
//	   			}
//	   			
//	   			window.moveTo(resizeWinLeft,resizeWinTop);
//	   			//修正一下边框和标题栏等的尺寸(safari使用resizeTo后offsetWidth不会改变,使用下面的方法会有问题,改成直接传参数过来)
//	   			//curWinHeight=curWinHeight+resizeH-document.body.offsetHeight;
//	   			//curWinWidth=curWinWidth+resizeW-document.body.offsetWidth;
//	   			if(curWinW!=null){
//	   				curWinWidth=curWinW;
//	   				curWinHeight=curWinH;
//	   			}
//	   		}
// 		}
//	}
}
			
			
			function doEdit(id) {
//				    var ww = window.screen.width,  ww1 = ww-40;
//				    var wh = window.screen.height, wh1 = wh-140;
//				    if( w > ww1 ) w = ww1;
//				    if( h > wh1 ) h = wh1;
//				    var l=(ww-w)/2-8;
//				    var t=(wh-100-h)/2-8;
//				document.getElementById("LoadProcess").style.top = (document.body.clientHeight / 2 - 50) + "px";
//				document.getElementById("LoadProcess").style.left = (document.body.clientWidth / 2 - 100) + "px";

//				// 获取窗口宽度
//				if (window.top.innerWidth)
//					ww = window.top.innerWidth;
//				else if ((document.body) && (document.body.clientWidth))
//					ww = document.body.clientWidth;
//				// 获取窗口高度
//				if (window.top.innerHeight)
//					wh = window.top.innerHeight;
//				else if ((document.body) && (document.body.clientHeight))
//					wh = document.body.clientHeight;
//				alert(ww);
//				var w = (ww - 200) + 'px';
//				var h = (wh - 100) + 'px';
//				
//				var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
//				parent.layer.style(index, {
//				  width: w,
//				  height: h,
//				  top: '50px',
//				  left: '100px',
//				});
				enlargeMyself();
								
									layer.open({
						type: 2,
						title: false,
						content: 'base/EstablishmentNew.html',
						area: ['1180px', '700px'],
						shadeClose: true,
						closeBtn: 1, //关闭按钮
						resize: false, //是否允许拉伸
						scrollbar: true, //是否允许浏览器出现滚动条
						moveOut: true
					});
				
//				var url = "../base/EstablishmentTypeEdit.html?id=" + id;
//				ShowIframeNoScroll("单位类别", url, 320, 260, "refreshWin()");
			}
		</script>
		<!--function doEdit(id) {
				var url = "../base/EstablishmentTypeEdit.html?id=" + id;
				ShowIframeNoScroll("单位类别", url, 320, 260, "refreshWin()");
			}-->
	</body>

</html>